<template>
  <smart-page>
    <template #actions>
    <a-button type="primary" @click="onExport()">导出数据</a-button>
    </template>
    <template #search>
      <smart-search :query-array="COIN_SEARCH" @on-handler="onSearch"/>
    </template>
    <a-table v-model:selectedKeys="selectedKeys"
             :table-layout-fixed="theme.layoutFixed"
             :row-selection="rowSelection"
             :columns="ORDER_COIN"
             :row-key="rowKey"
             :column-resizable="theme.resizable"
             :bordered="theme.bordered"
             :stripe="theme.stripe"
             :sticky-header="theme.sticky"
             :hoverable="theme.hoverAble"
             :pagination="pagination"
             :loading="theme.loading"
             :data="dataSource"
             @page-change="onPageChange"
             @page-size-change="onPageSizeChange">
      <template #action="{ record }">

        <a-link> 详情</a-link>


      </template>
    </a-table>


  </smart-page>
</template>
<script lang="ts" setup name="finance-order-coin">
import {onMounted} from 'vue';

import {ORDER_COIN} from "../resource/colums";
import {TablePage} from "@/libs/core";
import {SystemHttp} from "../resource/http";
import {Acl} from "@/libs/acl";
import {COIN_SEARCH} from "../resource/search";


const pageConfig = {title: '充值订单', rowKey: 'id', nameKey: 'title'}
const {getOrderCoinPage,getOrderCoinExport} = SystemHttp
const tablePage = new TablePage(pageConfig).setFetchXhr(getOrderCoinPage).setExportXhr(getOrderCoinExport).setPermission(Acl.FINANCE_ORDER_COIN_PAGE_LIST);
const {theme, pagination, rowKey, dataSource, rowSelection, selectedKeys} = tablePage
const {onFetch, onPageChange, onPageSizeChange, onDelete, onSearch,onExport} = tablePage
onMounted(() => onFetch())
</script>

